// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import 'babel-polyfill'
import Vue from 'vue'
import BootstrapVue from 'bootstrap-vue'
import VeeValidate from 'vee-validate'
import App from './App'
import router from './router'
import store from './store'
import { UPLOAD_PATH, ACCESS_PATH } from './service/api'
import {
  Pagination,
  Loading,
  MessageBox,
  Message,
  Checkbox,
  DatePicker,
  CheckboxGroup,
  Option,
  Select,
  Dialog,
  Form,
  FormItem,
  Input,
  Button
} from 'element-ui'

Vue.use(BootstrapVue)
Vue.use(Pagination)
Vue.use(DatePicker)
Vue.use(Loading.directive)
Vue.use(Checkbox)
Vue.use(CheckboxGroup)
Vue.use(Option)
Vue.use(Select)
Vue.use(Dialog)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Input)
Vue.use(Button)

Vue.use(VeeValidate)

Vue.prototype.$loading = Loading.service
Vue.prototype.$msgbox = MessageBox
Vue.prototype.$alert = MessageBox.alert
Vue.prototype.$confirm = MessageBox.confirm
Vue.prototype.$prompt = MessageBox.prompt
Vue.prototype.$notify = Notification
Vue.prototype.$message = Message

Vue.prototype.$upath = UPLOAD_PATH
Vue.prototype.$apath = ACCESS_PATH

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  template: '<App/>',
  components: {
    App
  }
})
